<template>
  <div class="welcome-container">
    <div class="cat-container">
      <div class="cat">
        <div class="cat-head">
          <div class="ears">
            <div class="ear left"></div>
            <div class="ear right"></div>
          </div>
          <div class="face">
            <div class="eyes">
              <div class="eye left">
                <div class="glasses"></div>
              </div>
              <div class="eye right">
                <div class="glasses"></div>
              </div>
            </div>
            <div class="nose"></div>
            <div class="mouth">
              <div class="tongue"></div>
            </div>
          </div>
        </div>
        <div class="watermelon-hat">
          <div class="hat-top"></div>
          <div class="hat-stripe stripe-1"></div>
          <div class="hat-stripe stripe-2"></div>
          <div class="hat-stripe stripe-3"></div>
          <div class="hat-leaf"></div>
        </div>
      </div>
    </div>
    
    <button class="go-button" @click="goToLogin">
      <span>走走走！吃瓜去</span>
    </button>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'

const router = useRouter()

const goToLogin = () => {
  router.push('/login')
}
</script>

<style scoped>
.welcome-container {
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.cat-container {
  width: 300px;
  height: 300px;
  position: relative;
  margin-bottom: 60px;
}

.cat {
  position: relative;
  width: 100%;
  height: 100%;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.ears {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  height: 120px;
  z-index: 2;
}

.ear {
  position: absolute;
  width: 70px;
  height: 80px;
  background: #8b7355;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  border: 3px solid #654d38;
}

.ear.left {
  left: 10px;
  transform: rotate(-30deg);
}

.ear.right {
  right: 10px;
  transform: rotate(30deg);
}

.cat-head {
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 120px;
  background: #f0d9b5;
  border-radius: 50%;
  border: 4px solid #8b7355;
  z-index: 1;
}

.face {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 130px;
}

.eyes {
  display: flex;
  justify-content: space-around;
  margin-bottom: 10px;
}

.eye {
  width: 25px;
  height: 30px;
  background: white;
  border-radius: 50%;
  position: relative;
}

.eye::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 15px;
  height: 18px;
  background: #654d38;
  border-radius: 50%;
}

.glasses {
  position: absolute;
  top: -8px;
  left: -8px;
  width: 38px;
  height: 38px;
  border: 3px solid #333;
  border-radius: 50%;
}

.nose {
  position: absolute;
  left: 50%;
  top: 40px;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 12px solid #ff9eb5;
}

.mouth {
  position: absolute;
  left: 50%;
  top: 50px;
  transform: translateX(-50%);
  width: 40px;
  height: 35px;
  background: #ff9eb5;
  border-radius: 50%;
  overflow: hidden;
}

.tongue {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 15px;
  background: #ffb3c6;
  border-radius: 0 0 20px 20px;
}

.watermelon-hat {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 60px;
  background: #2d6a2e;
  border-radius: 50% 50% 30% 30% / 50% 50% 20% 20%;
  border: 3px solid #1a4d1b;
  z-index: 3;
}

.hat-stripe {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: #1a4d1b;
}

.stripe-1 { top: 15px; }
.stripe-2 { top: 30px; }
.stripe-3 { top: 45px; }

.hat-leaf {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 30px;
  background: #2d6a2e;
  border-radius: 50% 20px 50% 50%;
  transform: translateX(-50%) rotate(-20deg);
  box-shadow: -5px 5px 0 0 #1a4d1b;
}

.go-button {
  background: #2dcc70;
  color: #fff;
  border: none;
  padding: 20px 60px;
  font-size: 20px;
  font-weight: bold;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 10px 30px rgba(45, 204, 112, 0.4);
}

.go-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(45, 204, 112, 0.6);
}

.go-button:active {
  transform: translateY(0);
}

.go-button span {
  background: linear-gradient(45deg, #ff0000, #ff6b6b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 24px;
  font-weight: 800;
}
</style>

